#pragma once
#include "Enemy.h"
#include "Boss.h"

//#include "../SGD Wrappers/SGD_Handle.h"

class GiantSpider :
	public Boss
{
public:
	GiantSpider();
	virtual ~GiantSpider() = default;

	/**********************************************************/
	// Interface:
	//	- virtual functions for children classes to override
	virtual void	Update(float elapsedTime)		override;
	virtual void	Render(void)					override;

	//	virtual SGD::Rectangle GetRect(void)	const			override;
	virtual int		GetType(void)	const			override	{ return OBJ_ENEMY; }
	virtual void	HandleCollision(GameObject* pOther)	override;
	virtual void	HandleEvent(const SGD::Event* pEvent) override;
	virtual int		GetEnemyType()	const { return ENEMY_BOSS; }
	bool GetOnGround() const { return onGround; }

	virtual bool DoAttack();
	virtual void Attack();
	virtual void EnterDead();

	void Ascend();
	void Descend();

	void MoveTowardsPlayer();

	SGD::Vector GetDistanceToPlayer(void) const { return m_vDistanceToPlayer; }
	void SetDistanceToPlayer(SGD::Vector dist) { m_vDistanceToPlayer = dist; }
	SGD::Vector aiming = { 0, 0 };

private:
	SGD::Vector	m_vDistanceToPlayer = SGD::Vector{ 0, 0 };
	bool onGround = true;
	bool rage = false;
	bool ascending = false;
	bool descending = false;
	float randSwitch = 10.0f;
	float descendTimer = 0;

	float spitCooldown = 0.0f;
};

